package pers.cj.pdos.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.PerformanceAnalysis;
import pers.cj.pdos.entity.ProfitsReport;
import pers.cj.pdos.entity.SaleAnalysis;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface IPerformanceAnalysisService extends IService<PerformanceAnalysis> {
    Map getTotalData(String companyId, String storeId, Date date1, Date date2);

    Map getHighSaleUser(String companyId, String storeId, Date date1, Date date2);


    List<PerformanceAnalysis> listUserData(String companyId,
                                           Integer page,
                                           Integer limit,
                                           String storeId,
                                           Date date1,
                                           Date date2,
                                           Boolean filterZero,
                                           String search,
                                           String userStoreId);

    Long countUserData(String companyId,
                       String storeId,
                       Date date1,
                       Date date2,
                       Boolean filterZero,
                       String search,
                       String userStoreId);

    BigDecimal getUserTotal(String companyId,
                             String storeId,
                             Date date1,
                             Date date2,
                             Boolean filterZero,
                             String search);

    List<PerformanceAnalysis> listDetailByOrder(String companyId,
                                                Integer page,
                                                Integer limit,
                                                String userId,
                                                String storeId,
                                                Date date1,
                                                Date date2,
                                                String search);

    Long countDetailByOrder(String companyId,
                            String userId,
                            String storeId,
                            Date date1,
                            Date date2,
                            String search);

    List<PerformanceAnalysis> listDetailByGoods(String companyId,
                                                Integer page,
                                                Integer limit,
                                                String userId,
                                                String storeId,
                                                Date date1,
                                                Date date2,
                                                String search);

    Long countDetailByGoods(String companyId,
                            String userId,
                            String storeId,
                            Date date1,
                            Date date2,
                            String search);
}
